<template>
	<view class="px-4">
		<view class="h3 font-weight-bold mb-3">{{newDetail.name}}</view>
		<view class="text-light-muted font">{{newDetail.createtime}}</view>
		<view>
			<rich-text :nodes="newDetail.content"></rich-text>
		</view>
	</view>
</template>

<script>
	import { postNewsDetail } from "../../api/home.js"
	export default {
		data() {
			return {
				newDetail: {}, // 咨询详情
			}
		},
		onLoad(e) {
			this.init(e.id)
		},
		methods: {
			async init(id) {
				var res = await postNewsDetail({id: id});
				if(res.data.code == 1) this.newDetail = res.data.data;
			}
		}	
	}
</script>

<style>

</style>
